library(DiagrammeR)
This is the simplest case
Add other vatiations:
- more nodes - check
- text on edges - check
- text on nodes - check
- add another layer (third row of nodes) - check
- add different shapes + documentation to shapes and other options.
- think on how to modify structure of diagram more programatically